Visual target tracking

ABSTRACT

A method of tracking a target includes receiving an observed depth image of the target from a source and obtaining a posed model of the target. The model is rasterized into a synthesized depth image, and the pose of the model is adjusted based, at least in part, on differences between the observed depth image and the synthesized depth image.

BACKGROUND

Many computer games and other computer vision applications utilizecomplicated controls to allow users to manipulate game characters orother aspects of an application. Such controls can be difficult tolearn, thus creating a barrier to entry for many games or otherapplications. Furthermore, such controls may be very different from theactual game actions or other application actions for which they areused. For example, a game control that causes a game character to swinga baseball bat may not at all resemble the actual motion of swinging abaseball bat.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter. Furthermore,the claimed subject matter is not limited to implementations that solveany or all disadvantages noted in any part of this disclosure.

Various embodiments related to visual target tracking are discussedherein. One disclosed embodiment includes tracking a target by receivingan observed depth image of the target from a source and obtaining aposed model of the target. The posed model is rasterized into asynthesized depth image. The pose of the model is then adjusted based,at least in part, on differences between the observed depth image andthe synthesized depth image.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A shows an embodiment of an exemplary target recognition,analysis, and tracking system tracking a game player playing a boxinggame.

FIG. 1B shows the game player of FIG. 1A throwing a punch that istracked and interpreted as a game control that causes a player avatar tothrow a punch in game space.

FIG. 2 schematically shows a computing system in accordance with anembodiment of the present disclosure.

FIG. 3 shows an exemplary body model used to represent a human target.

FIG. 4 shows a substantially frontal view of an exemplary skeletal modelused to represent a human target.

FIG. 5 shows a skewed view of an exemplary skeletal model used torepresent a human target.

FIG. 6 shows an exemplary mesh model used to represent a human target.

FIG. 7 shows a flow diagram of an example method of visually tracking atarget.

FIG. 8 shows an exemplary observed depth image.

FIG. 9 shows an exemplary synthesized depth image.

FIG. 10 schematically shows some of the pixels making up a synthesizeddepth image.

FIG. 11A schematically shows the application of a force to aforce-receiving location of a model.

FIG. 11B schematically shows a result of applying the force to theforce-receiving location of the model of FIG. 11A.

FIG. 12A shows a player avatar rendered from the model of FIG. 11A.

FIG. 12B shows a player avatar rendered from the model of FIG. 11B.

DETAILED DESCRIPTION

The present disclosure is directed to target recognition, analysis, andtracking. In particular, the use of a depth camera or other source foracquiring depth information for one or more targets is disclosed. Suchdepth information may then be used to efficiently and accurately modeland track the one or more targets, as described in detail below. Thetarget recognition, analysis, and tracking described herein provides arobust platform in which one or more targets can be consistently trackedat a relatively fast frame rate, even when the target(s) move into posesthat have been considered difficult to analyze using other approaches(e.g., when two or more targets partially overlap and/or occlude oneanother; when a portion of a target self-occludes another portion of thesame target, when a target changes its topographical appearance (e.g., ahuman touching his or her head), etc.).

FIG. 1A shows a nonlimiting example of a target recognition, analysis,and tracking system 10. In particular, FIG. 1A shows a computer gamingsystem 12 that may be used to play a variety of different games, playone or more different media types, and/or control or manipulate non-gameapplications. FIG. 1A also shows a display 14 in the form of ahigh-definition television, or HDTV 16, which may be used to presentgame visuals to game players, such as game player 18. Furthermore, FIG.1A shows a capture device in the form of a depth camera 20, which may beused to visually monitor one or more game players, such as game player18. The example shown in FIG. 1A is nonlimiting. As described below withreference to FIG. 2, a variety of different types of target recognition,analysis, and tracking systems may be used without departing from thescope of this disclosure.

A target recognition, analysis, and tracking system may be used torecognize, analyze, and/or track one or more targets, such as gameplayer 18. FIG. 1A shows a scenario in which game player 18 is trackedusing depth camera 20 so that the movements of game player 18 may beinterpreted by gaming system 12 as controls that can be used to affectthe game being executed by gaming system 12. In other words, game player18 may use his movements to control the game. The movements of gameplayer 18 may be interpreted as virtually any type of game control.

The example scenario illustrated in FIG. 1A shows game player 18 playinga boxing game that is being executed by gaming system 12. The gamingsystem uses HDTV 16 to visually present a boxing opponent 22 to gameplayer 18. Furthermore, the gaming system uses HDTV 16 to visuallypresent a player avatar 24 that gaming player 18 controls with hismovements. As shown in FIG. 1B, game player 18 can throw a punch inphysical space as an instruction for player avatar 24 to throw a punchin game space. Gaming system 12 and depth camera 20 can be used torecognize and analyze the punch of game player 18 in physical space sothat the punch can be interpreted as a game control that causes playeravatar 24 to throw a punch in game space. For example, FIG. 1B showsHDTV 16 visually presenting player avatar 24 throwing a punch thatstrikes boxing opponent 22 responsive to game player 18 throwing a punchin physical space.

Other movements by game player 18 may be interpreted as other controls,such as controls to bob, weave, shuffle, block, jab, or throw a varietyof different power punches. Furthermore, some movements may beinterpreted into controls that serve purposes other than controllingplayer avatar 24. For example, the player may use movements to end,pause, or save a game, select a level, view high scores, communicatewith a friend, etc.

In some embodiments, a target may include a human and an object. In suchembodiments, for example, a player of an electronic game may be holdingan object, such that the motions of the player and the object areutilized to adjust and/or control parameters of the electronic game. Forexample, the motion of a player holding a racket may be tracked andutilized for controlling an on-screen racket in an electronic sportsgame. In another example, the motion of a player holding an object maybe tracked and utilized for controlling an on-screen weapon in anelectronic combat game.

Target recognition, analysis, and tracking systems may be used tointerpret target movements as operating system and/or applicationcontrols that are outside the realm of gaming. Virtually anycontrollable aspect of an operating system and/or application, such asthe boxing game shown in FIGS. 1A and 1B, may be controlled by movementsof a target, such as game player 18. The illustrated boxing scenario isprovided as an example, but is not meant to be limiting in any way. Tothe contrary, the illustrated scenario is intended to demonstrate ageneral concept, which may be applied to a variety of differentapplications without departing from the scope of this disclosure.

The methods and processes described herein may be tied to a variety ofdifferent types of computing systems. FIGS. 1A and 1B show a nonlimitingexample in the form of gaming system 12, HDTV 16, and depth camera 20.As another, more general, example, FIG. 2 schematically shows acomputing system 40 that may perform one or more of the targetrecognition, tracking, and analysis methods and processes describedherein. Computing system 40 may take a variety of different forms,including, but not limited to, gaming consoles, personal computinggaming systems, military tracking and/or targeting systems, andcharacter acquisition systems offering green-screen or motion-capturefunctionality, among others.

Computing system 40 may include a logic subsystem 42, a data-holdingsubsystem 44, a display subsystem 46, and/or a capture device 48. Thecomputing system may optionally include components not shown in FIG. 2,and/or some components shown in FIG. 2 may be peripheral components thatare not integrated into the computing system. Logic subsystem 42 mayinclude one or more physical devices configured to execute one or moreinstructions. For example, the logic subsystem may be configured toexecute one or more instructions that are part of one or more programs,routines, objects, components, data structures, or other logicalconstructs. Such instructions may be implemented to perform a task,implement a data type, transform the state of one or more devices, orotherwise arrive at a desired result. The logic subsystem may includeone or more processors that are configured to execute softwareinstructions. Additionally or alternatively, the logic subsystem mayinclude one or more hardware or firmware logic machines configured toexecute hardware or firmware instructions. The logic subsystem mayoptionally include individual components that are distributed throughouttwo or more devices, which may be remotely located in some embodiments.

Data-holding subsystem 44 may include one or more physical devicesconfigured to hold data and/or instructions executable by the logicsubsystem to implement the herein described methods and processes. Whensuch methods and processes are implemented, the state of data-holdingsubsystem 44 may be transformed (e.g., to hold different data).Data-holding subsystem 44 may include removable media and/or built-indevices. Data-holding subsystem 44 may include optical memory devices,semiconductor memory devices (e.g., RAM, EEPROM, flash, etc.), and/ormagnetic memory devices, among others. Data-holding subsystem 44 mayinclude devices with one or more of the following characteristics:volatile, nonvolatile, dynamic, static, read/write, read-only, randomaccess, sequential access, location addressable, file addressable, andcontent addressable. In some embodiments, logic subsystem 42 anddata-holding subsystem 44 may be integrated into one or more commondevices, such as an application specific integrated circuit or a systemon a chip.

FIG. 2 also shows an aspect of the data-holding subsystem in the form ofcomputer-readable removable media 50, which may be used to store and/ortransfer data and/or instructions executable to implement the hereindescribed methods and processes.

Display subsystem 46 may be used to present a visual representation ofdata held by data-holding subsystem 44. As the herein described methodsand processes change the data held by the data-holding subsystem, andthus transform the state of the data-holding subsystem, the state ofdisplay subsystem 46 may likewise be transformed to visually representchanges in the underlying data. As a nonlimiting example, the targetrecognition, tracking, and analysis described herein may be reflectedvia display subsystem 46 in the form of a game character that changesposes in game space responsive to the movements of a game player inphysical space. Display subsystem 46 may include one or more displaydevices utilizing virtually any type of technology. Such display devicesmay be combined with logic subsystem 42 and/or data-holding subsystem 44in a shared enclosure, or such display devices may be peripheral displaydevices, as shown in FIGS. 1A and 1B.

Computing system 40 further includes a capture device 48 configured toobtain depth images of one or more targets. Capture device 48 may beconfigured to capture video with depth information via any suitabletechnique (e.g., time-of-flight, structured light, stereo image, etc.).As such, capture device 48 may include a depth camera, a video camera,stereo cameras, and/or other suitable capture devices.

For example, in time-of-flight analysis, the capture device 48 may emitinfrared light to the target and may then use sensors to detect thebackscattered light from the surface of the target. In some cases,pulsed infrared light may be used, wherein the time between an outgoinglight pulse and a corresponding incoming light pulse may be measured andused to determine a physical distance from the capture device to aparticular location on the target. In some cases, the phase of theoutgoing light wave may be compared to the phase of the incoming lightwave to determine a phase shift, and the phase shift may be used todetermine a physical distance from the capture device to a particularlocation on the target.

In another example, time-of-flight analysis may be used to indirectlydetermine a physical distance from the capture device to a particularlocation on the target by analyzing the intensity of the reflected beamof light over time, via a technique such as shuttered light pulseimaging.

In another example, structured light analysis may be utilized by capturedevice 48 to capture depth information. In such an analysis, patternedlight (i.e., light displayed as a known pattern such as grid pattern ora stripe pattern) may be projected onto the target. Upon striking thesurface of the target, the pattern may become deformed in response, andthis deformation of the pattern may be studied to determine a physicaldistance from the capture device to a particular location on the target.

In another example, the capture device may include two or morephysically separated cameras that view a target from different angles,to obtain visual stereo data. In such cases, the visual stereo data maybe resolved to generate a depth image.

In other embodiments, capture device 48 may utilize other technologiesto measure and/or calculate depth values. Additionally, capture device48 may organize the calculated depth information into “Z layers,” i.e.,layers perpendicular to a Z axis extending from the depth camera alongits line of sight to the viewer.

In some embodiments, two or more different cameras may be incorporatedinto an integrated capture device. For example, a depth camera and avideo camera (e.g., RGB video camera) may be incorporated into a commoncapture device. In some embodiments, two or more separate capturedevices may be cooperatively used. For example, a depth camera and aseparate video camera may be used. When a video camera is used, it maybe used to provide target tracking data, confirmation data for errorcorrection of target tracking, image capture, face recognition,high-precision tracking of fingers (or other small features), lightsensing, and/or other functions.

It is to be understood that at least some target analysis and trackingoperations may be executed by a logic machine of one or more capturedevices. A capture device may include one or more onboard processingunits configured to perform one or more target analysis and/or trackingfunctions. A capture device may include firmware to facilitate updatingsuch onboard processing logic.

Computing system 40 may optionally include one or more input devices,such as controller 52 and controller 54. Input devices may be used tocontrol operation of the computing system. In the context of a game,input devices, such as controller 52 and/or controller 54 can be used tocontrol aspects of a game not controlled via the target recognition,tracking, and analysis methods and procedures described herein. In someembodiments, input devices such as controller 52 and/or controller 54may include one or more of accelerometers, gyroscopes, infraredtarget/sensor systems, etc., which may be used to measure movement ofthe controllers in physical space. In some embodiments, the computingsystem may optionally include and/or utilize input gloves, keyboards,mice, track pads, trackballs, touch screens, buttons, switches, dials,and/or other input devices. As will be appreciated, target recognition,tracking, and analysis may be used to control or augment aspects of agame, or other application, conventionally controlled by an inputdevice, such as a game controller. In some embodiments, the targettracking described herein can be used as a complete replacement to otherforms of user input, while in other embodiments such target tracking canbe used to complement one or more other forms of user input.

Computing system 40 may be configured to perform the target trackingmethods described herein. However, it should be understood thatcomputing system 40 is provided as a nonlimiting example of a devicethat may perform such target tracking. Other devices are within thescope of this disclosure.

Computing system 40, or another suitable device, may be configured torepresent each target with a model. As described in more detail below,information derived from such a model can be compared to informationobtained from a capture device, such as a depth camera, so that thefundamental proportions or shape of the model, as well as its currentpose, can be adjusted to more accurately represent the modeled target.The model may be represented by one or more polygonal meshes, by a setof mathematical primitives, and/or via other suitable machinerepresentations of the modeled target.

FIG. 3 shows a nonlimiting visual representation of an example bodymodel 70. Body model 70 is a machine representation of a modeled target(e.g., game player 18 from FIGS. 1A and 1B). The body model may includeone or more data structures that include a set of variables thatcollectively define the modeled target in the language of a game orother application/operating system.

A model of a target can be variously configured without departing fromthe scope of this disclosure. In some examples, a model may include oneor more data structures that represent a target as a three-dimensionalmodel comprising rigid and/or deformable shapes, or body parts. Eachbody part may be characterized as a mathematical primitive, examples ofwhich include, but are not limited to, spheres, anisotropically-scaledspheres, cylinders, anisotropic cylinders, smooth cylinders, boxes,beveled boxes, prisms, and the like.

For example, body model 70 of FIG. 3 includes body parts bp1 throughbp14, each of which represents a different portion of the modeledtarget. Each body part is a three-dimensional shape. For example, bp3 isa rectangular prism that represents the left hand of a modeled target,and bp5 is an octagonal prism that represents the left upper-arm of themodeled target. Body model 70 is exemplary in that a body model maycontain any number of body parts, each of which may be anymachine-understandable representation of the corresponding part of themodeled target.

A model including two or more body parts may also include one or morejoints. Each joint may allow one or more body parts to move relative toone or more other body parts. For example, a model representing a humantarget may include a plurality of rigid and/or deformable body parts,wherein some body parts may represent a corresponding anatomical bodypart of the human target. Further, each body part of the model maycomprise one or more structural members (i.e., “bones”), with jointslocated at the intersection of adjacent bones. It is to be understoodthat some bones may correspond to anatomical bones in a human targetand/or some bones may not have corresponding anatomical bones in thehuman target.

The bones and joints may collectively make up a skeletal model, whichmay be a constituent element of the model. The skeletal model mayinclude one or more skeletal members for each body part and a jointbetween adjacent skeletal members. Exemplary skeletal model 80 andexemplary skeletal model 82 are shown in FIGS. 4 and 5, respectively.FIG. 4 shows a skeletal model 80 as viewed from the front, with jointsj1 through j33. FIG. 5 shows a skeletal model 82 as viewed from a skewedview, also with joints j1 through j33. Skeletal model 82 furtherincludes roll joints j34 through j47, where each roll joint may beutilized to track axial roll angles. For example, an axial roll anglemay be used to define a rotational orientation of a limb relative to itsparent limb and/or the torso. For example, if a skeletal model isillustrating an axial rotation of an arm, roll joint j40 may be used toindicate the direction the associated wrist is pointing (e.g., palmfacing up). Thus, whereas joints can receive forces and adjust theskeletal model, as described below, roll joints may instead beconstructed and utilized to track axial roll angles. More generally, byexamining an orientation of a limb relative to its parent limb and/orthe torso, an axial roll angle may be determined. For example, ifexamining a lower leg, the orientation of the lower leg relative to theassociated upper leg and hips may be examined in order to determine anaxial roll angle.

As described above, some models may include a skeleton and/or body partsthat serve as a machine representation of a modeled target. In someembodiments, a model may alternatively or additionally include awireframe mesh, which may include hierarchies of rigid polygonal meshes,one or more deformable meshes, or any combination of the two. As anonlimiting example, FIG. 6 shows a model 90 including a plurality oftriangles (e.g., triangle 92) arranged in a mesh that defines the shapeof the body model. Such a mesh may include bending limits at eachpolygonal edge. When a mesh is used, the number of triangles, and/orother polygons, that collectively constitute the mesh can be selected toachieve a desired balance between quality and computational expense.More triangles may provide higher quality and/or more accurate models,while fewer triangles may be less computationally demanding. A bodymodel including a polygonal mesh need not include a skeleton, althoughit may in some embodiments.

The above described body part models, skeletal models, and polygonalmeshes are nonlimiting example types of models that may be used asmachine representations of a modeled target. Other models are alsowithin the scope of this disclosure. For example, some models mayinclude patches, non-uniform rational B-splines, subdivision surfaces,or other high-order surfaces. A model may also include surface texturesand/or other information to more accurately represent clothing, hair,and/or other aspects of a modeled target. A model may optionally includeinformation pertaining to a current pose, one or more past poses, and/ormodel physics. It is to be understood that any model that can be posedand then rasterized to (or otherwise rendered to or expressed by) asynthesized depth image, is compatible with the herein described targetrecognition, analysis, and tracking.

As mentioned above, a model serves as a representation of a target, suchas game player 18 in FIGS. 1A and 1B. As the target moves in physicalspace, information from a capture device, such as depth camera 20 inFIGS. 1A and 1B, can be used to adjust a pose and/or the fundamentalsize/shape of the model so that it more accurately represents thetarget. In particular, one or more forces may be applied to one or moreforce-receiving aspects of the model to adjust the model into a posethat more closely corresponds to the pose of the target in physicalspace. Depending on the type of model that is being used, the force maybe applied to a joint, a centroid of a body part, a vertex of atriangle, or any other suitable force-receiving aspect of the model.Furthermore, in some embodiments, two or more different calculations maybe used when determining the direction and/or magnitude of the force. Asdescribed in more detail below, differences between an observed image ofthe target, as retrieved by a capture device, and a rasterized (i.e.,synthesized) image of the model may be used to determine the forces thatare applied to the model in order to adjust the body into a differentpose.

FIG. 7 shows a flow diagram of an example method 100 of tracking atarget using a model (e.g., body model 70 of FIG. 3). In someembodiments, the target may be a human, and the human may be one of twoor more targets being tracked. As such, in some embodiments, method 100may be executed by a computing system (e.g., gaming system 12 shown inFIG. 1 and/or computing system 40 shown in FIG. 2) to track one or moreplayers interacting with an electronic game being played on thecomputing system. As introduced above, tracking of the players allowsphysical movements of those players to act as a real-time user interfacethat adjusts and/or controls parameters of the electronic game. Forexample, the tracked motions of a player may be used to move anon-screen character or avatar in an electronic role-playing game. Inanother example, the tracked motions of a player may be used to controlan on-screen vehicle in an electronic racing game. In yet anotherexample, the tracked motions of a player may be used to control thebuilding or organization of objects in a virtual environment.

At 102, method 100 includes receiving an observed depth image of thetarget from a source. In some embodiments, the source may be a depthcamera configured to obtain depth information about the target via asuitable technique such as time-of-flight analysis, structured lightanalysis, stereo vision analysis, or other suitable techniques. Theobserved depth image may include a plurality of observed pixels, whereeach observed pixel has an observed depth value. The observed depthvalue includes depth information of the target as viewed from thesource. FIG. 8 shows a visual representation of an exemplary observeddepth image 140. As shown, observed depth image 140 captures anexemplary observed pose of a person (e.g., game player 18) standing withhis arms raised.

As shown at 104 of FIG. 7, upon receiving the observed depth image,method 100 may optionally include downsampling the observed depth imageto a lower processing resolution. Downsampling to a lower processingresolution may allow the observed depth image to be more easily utilizedand/or more quickly processed with less computing overhead.

As shown at 106, upon receiving the observed depth image, method 100 mayoptionally include removing non-player background elements from theobserved depth image. Removing such background elements may includeseparating various regions of the observed depth image into backgroundregions and regions occupied by the image of the target. Backgroundregions can be removed from the image or identified so that they can beignored during one or more subsequent processing steps. Virtually anybackground removal technique may be used, and information from tracking(and from the previous frame) can optionally be used to assist andimprove the quality of background-removal.

As shown at 108, upon receiving the observed depth image, method 100 mayoptionally include removing and/or smoothing one or more high-varianceand/or noisy depth values from the observed depth image. Suchhigh-variance and/or noisy depth values in the observed depth image mayresult from a number of different sources, such as random and/orsystematic errors occurring during the image capturing process, defectsand/or aberrations resulting from the capture device, etc. Since suchhigh-variance and/or noisy depth values may be artifacts of the imagecapturing process, including these values in any future analysis of theimage may skew results and/or slow calculations. Thus, removal of suchvalues may provide better data integrity for future calculations.

Other depth values may also be filtered. For example, the accuracy ofgrowth operations described below with reference to step 118 may beenhanced by selectively removing pixels satisfying one or more removalcriteria. For instance, if a depth value is halfway between a hand andthe torso that the hand is occluding, removing this pixel can preventgrowth operations from spilling from one body part onto another duringsubsequent processing steps.

As shown at 110, method 100 may optionally include filling in and/orreconstructing portions of missing and/or removed depth information.Such backfilling may be accomplished by averaging nearest neighbors,filtering, and/or any other suitable method.

As shown at 112 of FIG. 7, method 100 may include obtaining a model(e.g., body model 70 of FIG. 3). As described above, the model mayinclude one or more polygonal meshes, one or more mathematicalprimitives, one or more high-order surfaces, and/or other features usedto provide a machine representation of the target. Furthermore, themodel may exist as an instance of one or more data structures existingon a computing system.

In some embodiments of method 100, the model may be a posed modelobtained from a previous time step. For example, if method 100 isperformed continuously, a posed model resulting from a previousiteration of method 100, corresponding to a previous time step, may beobtained.

In some embodiments, a pose may be determined by one or more algorithms,which can analyze a depth image and identify, at a coarse level, wherethe target(s) of interest (e.g., human(s)) are located and/or the poseof such target(s). Algorithms can be used to select a pose during aninitial iteration or whenever it is believed that the algorithm canselect a pose more accurate than the pose calculated during a previoustime step.

In some embodiments, the model may be obtained from a database and/orother program. For example, a model may not be available during a firstiteration of method 100, in which case the model may be obtained from adatabase including one or more models. In such a case, a model from thedatabase may be chosen using a searching algorithm designed to select amodel exhibiting a pose similar to that of the target. Even if a modelfrom a previous time step is available, a model from a database may beused. For example, a model from a database may be used after a certainnumber of frames, if the target has changed poses by more than apredetermined threshold, and/or according to other criteria.

In other embodiments, the model, or portions thereof, may besynthesized. For example, if the target's body core (torso, midsection,and hips) are represented by a deformable polygonal model, that modelmay be originally constructed using the contents of an observed depthimage, where the outline of the target in the image (i.e., thesilhouette) may be used to shape the mesh in the X and Y dimensions.Additionally, in such an approach, the observed depth value(s) in thatarea of the observed depth image may be used to “mold” the mesh in theXY direction, as well as in the Z direction, of the model to morefavorably represent the target's body shape.

Method 100 may further include representing any clothing appearing onthe target using a suitable approach. Such a suitable approach mayinclude adding to the model auxiliary geometry in the form of primitivesor polygonal meshes, and optionally adjusting the auxiliary geometrybased on poses to reflect gravity, cloth simulation, etc. Such anapproach may facilitate molding the models into more realisticrepresentations of the targets.

As shown at 114, method 100 may optionally comprise applying a momentumalgorithm to the model. Because the momentum of various parts of atarget may predict change in an image sequence, such an algorithm mayassist in obtaining the pose of the model. The momentum algorithm mayuse a trajectory of each of the joints or vertices of a model over afixed number of a plurality of previous frames to assist in obtainingthe model.

In some embodiments, knowledge that different portions of a target canmove a limited distance in a time frame (e.g., 1/30th or 1/60th of asecond) can be used as a constraint in obtaining a model. Such aconstraint may be used to rule out certain poses when a prior frame isknown.

At 116 of FIG. 7, method 100 may also include rasterizing the model intoa synthesized depth image. Rasterization allows the model described bymathematical primitives, polygonal meshes, or other objects to beconverted into a synthesized depth image described by a plurality ofpixels.

Rasterizing may be carried out using one or more different techniquesand/or algorithms. For example, rasterizing the model may includeprojecting a representation of the model onto a two-dimensional plane.In the case of a model including a plurality of body-part shapes (e.g.,body model 70 of FIG. 3), rasterizing may include projecting andrasterizing the collection of body-part shapes onto a two-dimensionalplane. For each pixel in the two dimensional plane onto which the modelis projected, various different types of information may be stored.

FIG. 9 shows a visual representation 150 of an exemplary synthesizeddepth image corresponding to body model 70 of FIG. 3. FIG. 10 shows apixel matrix 160 of a portion of the same synthesized depth image. Asindicated at 170, each synthesized pixel in the synthesized depth imagemay include a synthesized depth value. The synthesized depth value for agiven synthesized pixel may be the depth value from the correspondingpart of the model that is represented by that synthesized pixel, asdetermined during rasterization. In other words, if a portion of aforearm body part (e.g., forearm body part bp4 of FIG. 3) is projectedonto a two-dimensional plane, a corresponding synthesized pixel (e.g.,synthesized pixel 162 of FIG. 10) may be given a synthesized depth value(e.g., synthesized depth value 164 of FIG. 10) equal to the depth valueof that portion of the forearm body part. In the illustrated example,synthesized pixel 162 has a synthesized depth value of 382 cm. Likewise,if a neighboring hand body part (e.g., hand body part bp3 of FIG. 3) isprojected onto a two-dimensional plane, a corresponding synthesizedpixel (e.g., synthesized pixel 166 of FIG. 10) may be given asynthesized depth value (e.g., synthesized depth value 168 of FIG. 10)equal to the depth value of that portion of the hand body part. In theillustrated example, synthesized pixel 166 has a synthesized depth valueof 383 cm. It is to be understood that the above is provided as anexample. Synthesized depth values may be saved in any unit ofmeasurement or as a dimensionless number.

As indicated at 170, each synthesized pixel in the synthesized depthimage may include an original body-part index determined duringrasterization. Such an original body-part index may indicate to which ofthe body parts of the model that pixel corresponds. In the illustratedexample of FIG. 10, synthesized pixel 162 has an original body-partindex of bp4, and synthesized pixel 166 has an original body-part indexof bp3. In some embodiments, the original body-part index of asynthesized pixel may be nil if the synthesized pixel does notcorrespond to a body part of the target (e.g., if the synthesized pixelis a background pixel). In some embodiments, synthesized pixels that donot correspond to a body part may be given a different type of index.

As indicated at 170, each synthesized pixel in the synthesized depthimage may include an original player index determined duringrasterization, the original player index corresponding to the target.For example, if there are two targets, synthesized pixels correspondingto the first target will have a first player index and synthesizedpixels corresponding to the second target will have a second playerindex. In the illustrated example, the pixel matrix 160 corresponds toonly one target, therefore synthesized pixel 162 has an original playerindex of P1, and synthesized pixel 166 has an original player index ofP1. Other types of indexing systems may be used without departing fromthe scope of this disclosure.

As indicated at 170, each synthesized pixel in the synthesized depthimage may include a pixel address. The pixel address may define theposition of a pixel relative to other pixels. In the illustratedexample, synthesized pixel 162 has a pixel address of [5,7], andsynthesized pixel 166 has a pixel address of [4,8]. It is to beunderstood that other addressing schemes may be used without departingfrom the scope of this disclosure.

As indicated at 170, each synthesized pixel may optionally include othertypes of information, some of which may be obtained after rasterization.For example, each synthesized pixel may include an updated body-partindex, which may be determined as part of a snap operation performedduring rasterization, as described below, Each synthesized pixel mayinclude an updated player index, which may be determined as part of asnap operation performed during rasterization. Each synthesized pixelmay include an updated body-part index, which may be obtained as part ofa grow/fix operation, as described below. Each synthesized pixel mayinclude an updated player index, which may be obtained as part of agrow/fix operation, as described above.

The example types of pixel information provided above are not limiting.Various different types of information may be stored as part of eachpixel. Such information can be stored as part of a common datastructure, or the different types of information may be stored indifferent data structures that can be mapped to particular pixellocations (e.g., via a pixel address). As an example, player indicesand/or body-part indices obtained as part of a snap operation duringrasterization may be stored in a rasterization map and/or a snap map,while player indices and/or body-part indices obtained as part of agrow/fix operation after rasterization may be stored in a grow map, asdescribed below. Nonlimiting examples of other types of pixelinformation that may be assigned to each pixel include, but are notlimited to, joint indices, bone indices, vertex indices, triangleindices, centroid indices, and the like.

At 118, method 100 of FIG. 7 may optionally include snapping and/orgrowing the body-part indices and/or player indices. In other words, thesynthesized depth image may be augmented so that the body-part indexand/or player index of some pixels are changed in an attempt to moreclosely correspond to the modeled target.

In performing the above described rasterizations, one or more Z-Buffersand/or body-part/player index maps may be constructed. As a nonlimitingexample, a first version of such a buffer/map may be constructed byperforming a Z-test in which a surface closest to the viewer (e.g.,depth camera) is selected and a body-part index and/or player indexassociated with that surface is written to the corresponding pixel. Thismap may be referred to as the rasterization map or the originalsynthesized depth map. A second version of such a buffer/map may beconstructed by performing a Z-test in which a surface that is closest toan observed depth value at that pixel is selected and a body-part indexand/or player index associated with that surface is written to thecorresponding pixel. This may be referred to as the snap map. Such testsmay be constrained so as to reject a Z-distance between a synthesizeddepth value and an observed depth value that is beyond a predeterminedthreshold. In some embodiments, two or more Z-buffers and/or two or morebody-part/player index maps may be maintained, thus allowing two or moreof the above described tests to be carried out.

A third version of a buffer/map may be constructed by growing and/orcorrecting a body-part/player index map. This may be referred to as agrow map. Starting with a copy of the snap map described above, thevalues may be grown over any “unknown” values within a predeterminedZ-distance, so that a space being occupied by the target, but not yetoccupied by the body model, may be filled with proper body-part/playerindices. Such an approach may further include overtaking a known valueif a more favorable match is identified.

The grow map may begin with a pass over synthesized pixels of the snapmap to detect pixels having neighboring pixels with a differentbody-part/player index. These may be considered “edge” pixels, i.e.,frontiers along which values may optionally be propagated. As introducedabove, growing the pixel values may include growing into either“unknown” or “known” pixels. For “unknown” pixels, the body-part/playerindex value, for example, in one scenario, may have been zero before,but may now have a non-zero neighboring pixel. In such a case, the fourdirect neighboring pixels may be examined, and the neighboring pixelhaving an observed depth value more closely resembling that of the pixelof interest may be selected and assigned to the pixel of interest. Inthe case of “known” pixels, it may be possible that a pixel with a knownnonzero body-part/player index value may be overtaken, if one of itsneighboring pixels has a depth value written during rasterization thatmore closely matches the observed depth value of the pixel of interestthan that of the synthesized depth value for that pixel.

Additionally, for efficiency, updating a body-part/player index value ofa synthesized pixel may include adding its neighboring four pixels to aqueue of pixels to be revisited on a subsequent pass. As such, valuesmay continue to be propagated along the frontiers without doing anentire pass over all the pixels. As another optimization, different N×Nblocks of pixels (e.g., 16×16 blocks of pixels) occupied by a target ofinterest can be tracked so that other blocks that are not occupied by atarget of interest can be ignored. Such an optimization may be appliedat any point during the target analysis after rasterization in variousforms.

It is to be noted, however, that grow operations may take a variety ofdifferent forms. For example, various flood-fills may first be performedto identify regions of like values, and then it can be decided whichregions belong to which body parts. Furthermore, the number of pixelsthat any body-part/player index object (e.g., left forearm body part bp4of FIG. 3) can grow may be limited based on how many pixels such anobject is expected to occupy (e.g., given its shape, distance and angle)vs. how many pixels in the snap map were assigned that body-part/playerindex. Additionally, the aforementioned approaches may include addingadvantages or disadvantages, for certain poses, to bias the growth forcertain body parts so that the growth may be correct.

A progressive snap adjustment can be made to the snap map if it isdetermined that a distribution of pixels from a body part is grouped atone depth, and another distribution of pixels from the same body part isgrouped at another depth, such that a gap exists between these twodistributions. For example, an arm waving in front of a torso, and nearto that torso, may “spill into” the torso. Such a case may yield a groupof torso pixels with a body-part index indicating that they are armpixels, when in fact they should be torso pixels. By examining thedistribution of synthesized depth values in the lower arm, it may bedetermined that some of the arm pixels may be grouped at one depth, andthe rest may be grouped at another depth. The gap between these twogroups of depth values indicates a jump between arm pixels and whatshould be torso pixels. Thus, in response to identifying such a gap, thespillover may then be remedied by assigning torso body-part indices tothe spillover pixels. As another example, a progressive snap adjustmentcan be helpful in an arm-over-background-object case. In this case, ahistogram can be used to identify a gap in the observed depth of thepixels of interest (i.e., pixels thought to belong to the arm). Based onsuch a gap, one or more groups of pixels can be identified as properlybelonging to an arm and/or other group(s) can be rejected as backgroundpixels. The histogram can be based on a variety of metrics, such asabsolute depth; depth error (synthesized depth—observed depth), etc. Theprogressive snap adjustment may be performed in-line duringrasterization, prior to any grow operations.

At 120, method 100 of FIG. 7 may optionally include creating a heightmap from the observed depth image, the synthesized depth image, and thebody-part/player index maps at the three stages of processing describedabove. The gradient of such a height map, and/or a blurred version ofsuch a height map, may be utilized when determining the directions ofadjustments that are to be made to the model, as described hereafter.The height map is merely an optimization, however; alternatively oradditionally, a search in all directions may be performed to identifynearest joints where adjustments may be applied and/or the direction inwhich such adjustments are to be made. When a height map is used, it maybe created before, after, or in parallel to the pixel classdeterminations described below. When used, the height map is designed toset the player's actual body at a low elevation and the backgroundelements at a high elevation. A watershed-style technique can then beused to trace “downhill” in the height map, to find the nearest point onthe player from the background, or vice versa (i.e., seek “uphill” inthe height map to find the nearest background pixel to a given playerpixel).

The synthesized depth image and the observed depth image may not beidentical, and thus the synthesized depth image can use adjustments andor modifications so that it more closely matches an observed depth imageand can thus more accurately represent the target. It is to beunderstood that adjustments can be made to the synthesized depth imageby first making adjustments to the model (e.g., change the pose of themodel), and then synthesizing the adjusted model into a new version ofthe synthesized depth image.

A number of different approaches may be taken to modify a synthesizeddepth image. In one approach, two or more different models may beobtained and rasterized to yield two or more synthesized depth images.Each synthesized depth image may then be compared to the observed depthimage by a predetermined set of comparison metrics. The synthesizeddepth image demonstrating a closest match to the observed depth imagemay be selected, and this process may be optionally repeated in order toimprove the model. When used, this process can be particularly usefulfor refining the body model to match the player's body type and/ordimensions.

In another approach, the two or more synthesized depth images may beblended via interpolation or extrapolation to yield a blendedsynthesized depth image. In yet another approach, two or moresynthesized depth images may be blended in such a way that the blendingtechniques and parameters vary across the blended synthesized depthimage. For example, if a first synthesized depth image is favorablymatched to the observed depth image in one region, and a secondsynthesized depth image is favorably matched in a second region, thepose selected in the blended synthesized depth image could be a mixtureresembling the pose used to create the first synthesized depth image inthe first region, and the pose used to create the second synthesizeddepth image in the second region.

In yet another approach, and as indicated at 122 in FIG. 7, thesynthesized depth image may be compared to the observed depth image.Each synthesized pixel of the synthesized depth image may be classifiedbased on the results of the comparison. Such classification may bereferred to as determining the pixel case for each pixel. The model usedto create the synthesized depth image (e.g., body model 70 of FIG. 3)may be systematically adjusted in accordance with the determined pixelcases. In particular, a force vector (magnitude and direction) may becalculated at each pixel based on the determined pixel case and,depending on the type of model, the computed force vector can be appliedto a nearest joint, a centroid of a body part, a point on a body part, avertex of a triangle, or another predetermined force-receiving locationof the model used to generate the synthesized depth image. In someembodiments, the force attributed to a given pixel can be distributedbetween two or more force-receiving locations on the model.

One or more pixel cases may be selected for each synthesized pixel basedon one or more factors, which include, but are not limited to—thedifference between an observed depth value and a synthesized depth valuefor that synthesized pixel; the difference between the originalbody-part index, the (snap) body-part index, and/or the (grow) body/partindex for that synthesized pixel; and/or the difference between theoriginal player index, the (snap) player index, and/or the (grow) playerindex for that synthesized pixel.

As indicated at 124 of FIG. 7, determining a pixel case may includeselecting a refine-z pixel case. The refine-z pixel case may be selectedwhen the observed depth value of an observed pixel (or in a region ofobserved pixels) of the observed depth image does not match thesynthesized depth value(s) in the synthesized depth image, but is closeenough to likely belong to the same object in both images, and thebody-part indices match (or, in some cases, correspond to neighboringbody parts or regions). A refine-z pixel case may be selected for asynthesized pixel if a difference between an observed depth value and asynthesized depth value for that synthesized pixel is within apredetermined range and, optionally, if that synthesized pixel's (grow)body party index corresponds to a body part that has not been designatedfor receiving magnetism forces. The refine-z pixel case corresponds to acomputed force vector that may exert a force on the model to move themodel into the correct position. The computed force vector may beapplied along the Z axis perpendicular to the image plane, along avector normal to an aspect of the model (e.g., face of the correspondingbody part), and/or along a vector normal to nearby observed pixels. Themagnitude of the force vector is based on the difference in the observedand synthesized depth values, with greater differences corresponding tolarger forces. The force-receiving location to which the force isapplied can be selected to be the nearest qualifying force-receivinglocation to the pixel of interest (e.g., nearest torso joint), or theforce can be distributed among a weighted blend of the nearestforce-receiving locations. The nearest force-receiving location may bechosen, however, in some cases, the application of biases can behelpful. For example, if a pixel lies halfway down the upper leg, and ithas been established that the hip joint is less mobile (or agile) thanthe knee, it may be helpful to bias the joint forces for mid-leg pixelsto act on the knee rather than the hip.

The determination of which force-receiving location is nearest to thepixel of interest can be found by a brute-force search, with or withoutthe biases mentioned above. To accelerate the search, the set offorce-receiving locations searched may be limited to only those on ornear the body part that is associated with the body-part index of thispixel. BSP (binary space partitioning) trees may also be set up, eachtime the pose is changed, to help accelerate these searches. Each regionon the body, or each body part corresponding to a body-part index, maybe given its own BSP tree. If so, the biases can be applied differentlyfor each body part, which further enables wise selection of the properforce-receiving locations.

As indicated at 126 of FIG. 7, determining a pixel case may includeselecting a magnetism pixel case. The magnetism pixel case may beutilized when the synthesized pixel being examined, in the (grow/) mapcorresponds to a predetermined subset of the body parts (e.g., the arms,or bp3, bp4, bp5, bp7, bp8, and bp9 of FIG. 3). While the arms areprovided as an example, other body parts, such as the legs or the entirebody, may optionally be associated with the magnetism pixel case in somescenarios. Likewise, in some scenarios, the arms may not be associatedwith the magnetism pixel case.

The pixels marked for the magnetism case may be grouped into regions,each region being associated with a specific body part (such as, in thisexample, upper left arm, lower left arm, left hand, and so on). Whichregion a pixel belongs to can be determined from its body-part index,or, a more accurate test can be performed (to reduce error potentiallyintroduced in the grow operation) by comparing the pixel's position tovarious points in or on the body model (but not restricted to the bodypart indicated by the pixel's body-part index). For example, for a pixelsomewhere on the left arm, various metrics can be used to determine towhich bone segment (shoulder-to-elbow, elbow-to-wrist, orwrist-to-tip-of-hand) the pixel is the most likely to belong. Each ofthese bone segments may be considered a “region”.

For each of these magnetism regions, centroids of the pixels belongingto the region may be computed. These centroids can be either orthodox(all contributing pixels are weighted equally), or biased, where somepixels carry more weight than others. For example, for the upper arm,three centroids may be tracked: 1) an unbiased centroid, 2) a “near”centroid, whose contributing pixels are weighted more heavily when theyare closer to the shoulder; and 3) a “far” centroid, whose contributingpixels are weighted more heavily when closer to the elbow. Theseweightings may be linear (e.g., 2×) or nonlinear (e.g., x²) or followany curve.

Once these centroids are computed, a variety of options are available(and can be chosen dynamically) for computing the position andorientation of the body part of interest, even if some are partiallyoccluded. For example, when trying to determine the new position for theelbow, if the centroid in that area is sufficiently visible (if the sumof the weights of the contributing pixels exceeds a predeterminedthreshold), then the centroid itself marks the elbow (estimate #1).However, if the elbow area is not visible (perhaps because it isoccluded by some other object or body part), the elbow location canstill often be determined, as described in the following nonlimitingexample. If the far centroid of the upper arm is visible, then aprojection can be made out from the shoulder, through this centroid, bythe length of the upper arm, to obtain a very likely position for theelbow (estimate #2) If the near centroid of the lower arm is visible,then a projection can be made up from the wrist, through this centroid,by the length of the lower arm, to obtain a very likely position for theelbow (estimate #3).

A selection of one of the three potential estimates can be made, or ablend between the three potential estimates may be made, giving priority(or higher weight) to the estimates that have higher visibility,confidence, pixel counts, or any number of other metrics. Finally, inthis example, a single force vector may be applied to the model at thelocation of the elbow; however, it may be more heavily weighted (whenaccumulated with the pixel force vectors resulting from other pixelcases, but acting on this same force-receiving location), to representthe fact that many pixels were used to construct it. When applied, thecomputed force vector may move the model so that the corresponding modelmore favorably matches the target shown in the observed image. Anadvantage of the magnetism pixel case is its ability to work well withhighly agile body parts, such as arms.

In some embodiments, a model without defined joints or body parts may beadjusted using only the magnetism pixel case.

As indicated at 128 and at 130 of FIG. 7, determining a pixel case mayinclude selecting a pull pixel case and/or a push pixel case. Thesepixel cases may be invoked at the silhouette, where the synthesized andobserved depth values may be severely mismatched at the same pixeladdress. It is noted that the pull pixel case and the push pixel casecan also be used when the original player index does not match the(grow) player index. The determination of push vs. pull is as follows.If the synthesized depth image contains a depth value that is less than(closer than) the depth value in the observed depth image at that samepixel address, then the model can be pulled toward the true silhouetteseen in the grown image. Conversely, if the original synthesized imagecontains a depth value that is greater than (farther than) the depthvalue in the observed depth image, then the model can be pushed out ofthe space that the player no longer occupies (and toward the realsilhouette in the grown image) In either case, for each of these pixelsor pixel regions, a two- or three-dimensional computed force vector maybe exerted on the model to correct the silhouette mismatch, eitherpushing or pulling parts of the body model into a position that moreaccurately matches the position of the target in the observed depthimage. The direction of such pushing and/or pulling is oftenpredominantly in the XY plane, although a Z component can be added tothe force in some scenarios.

In order to produce the proper force vector for a pull or push case, thenearest point on either the player silhouette in the synthesized depthimage (for a pull case), or on the player silhouette in the observeddepth image (for a push case) may first be found. This point can befound, for each source pixel (or for each group of source pixels), byperforming a brute-force, exhaustive 2D search for the nearest point (onthe desired silhouette) that meets the following criteria. In the pullpixel case, the closest pixel with a player index in the original map(at the seek position) that matches the player index in the grown map(at the source pixel or region) is found. In the push pixel case, theclosest pixel with a player index in the grown map (at the seekposition) that matches the player index in the original map (at thesource pixel or region) is found.

However, a brute force search can be very computationally expensive, andoptimizations can be used to reduce computational expense. Onenon-limiting example optimization for finding this point moreefficiently is to follow the gradient of the above described height map,or a blurred version thereof, and to only examine pixels in a straightline, in the direction of the gradient. In this height map, the heightvalues are low where the player index is the same in both the originaland grown player index maps, and the height values are high where theplayer index (in both maps) is zero. The gradient can be defined as thevector, at any given pixel, pointing “downhill” in this height map. Bothpull and push pixels can then seek along this gradient (downhill) untilthey reach their respective stopping condition, as described above.Other basic optimizations for this seek operation include skippingpixels, using interval halving, or using a slope-based approach;re-sampling the gradient, at intervals, as the seek progresses; as wellas checking nearby for better/closer matches (not directly along thegradient) once the stopping criteria are met.

No matter what technique is used to find the nearest point on thesilhouette of interest, the distance traveled (the distance between thesource pixel and the silhouette pixel), D1, may be used to calculate themagnitude (length), D2, of the force vector that will push or pull themodel. In some embodiments, D2 may be linearly or nonlinearly related toD1 (e.g., D2=2*D1 or D2=D1 ²). As one nonlimiting example, the followingformula can be sued: D2=(D1−0.5 pixels)*2. For example, if there is a5-pixel gap between the silhouette in the two depth images, each pixelin this gap may perform a small “seek” and produce a force vector. Thepixels near the real silhouette may seek by only 1 pixel to reach thesilhouette, so the force magnitude at those pixels will be (1−0.5)*2=1.The pixels far from the real silhouette may seek by 5 pixels, so theforce magnitude will be (5−0.5)*2=9. In general, going from the pixelsclosest to the real silhouette to those farthest, the seek distanceswill be D1={1, 2, 3, 4, 5} and the force magnitudes produced will be:D2={1, 3, 5, 7, 9}. The average of D2 in this case is 5, as desired—theaverage magnitudes of the resulting force vectors are equivalent to thedistance between the silhouettes (near each force-receiving location),which is the distance that the model can be moved to put the model inthe proper place.

The final force vector, for each source pixel, may then be constructedwith a direction and a magnitude (i.e., length). For pull pixels, thedirection is determined by the vector from the silhouette pixel to thesource pixel; for push pixels, it is the opposite vector. The length ofthis force vector is D2. At each pixel, then, the force may be appliedto a best-qualifying (e.g., nearest) force-receiving location (ordistributed between several), and these forces can be averaged, at eachforce-receiving location, to produce the proper localized movements ofthe body model.

As indicated at 132 and at 134 of FIG. 7, determining a pixel case mayinclude selecting a self-occluding push and/or pull pixel case. Whereasin the above-mentioned push and pull pixel cases a body part may bemoving in the foreground relative to a background or another target, theself-occluding push and pull pixel cases consider the scenarios wherethe body part is in front of another body part of the same target (e.g.,one leg in front of another, arm in front of torso, etc.). These casesmay be identified when the pixel's (snap) player index matches itscorresponding (grow) player index, but when the(snap) body-part indexdoes not match its corresponding (grow) body-part index. In such cases,the seek direction (to find the silhouette) may be derived in severalways. As nonlimiting examples, a brute-force 2D search may be performed;a second set of “occlusion” height maps may be tailored for this case sothat a gradient can guide a ID search; or the direction may be settoward the nearest point on the nearest skeletal member. Details forthese two cases are otherwise similar to the standard pull and pushcases.

Push, pull, self-occluding push, and/or self-occluding pull pixel casesmay be selected for a synthesized pixel if that synthesized pixel's(grow) body party index corresponds to a body part that has not beendesignated for receiving magnetism forces.

It is to be understood that in some scenarios a single pixel may beresponsible for one or more pixel cases. As a nonlimiting example, apixel may be responsible for both a self-occluding push pixel force anda refine-z pixel force, where the self-occluding push pixel force isapplied to a force-receiving location on the occluding body part and therefine-z pixel force is applied to a force-receiving location on thebody part being occluded.

As indicated at 136 of FIG. 7, determining a pixel case may includeselecting no pixel case for a synthesized pixel. Oftentimes a forcevector will not need to be calculated for all synthesized pixels of thesynthesized depth image. For example, synthesized pixels that arefarther away from the body model shown in the synthesized depth image,and observed pixels that are farther away from the target shown in theobserved depth image (i.e., background pixels), may not influence anyforce-receiving locations or body parts. A pixel case need not bedetermined for such pixels, although it can be in some scenarios. Asanother example, a difference between an observed depth value and asynthesized depth value for that synthesized pixel may be below apredetermined threshold value (e.g., the model already matches theobserved image). As such, a pixel case need not be determined for suchpixels, although it can be in some scenarios.

The table provided below details an example relationship between thepixel cases described above and the joints illustrated in skeletal model82 of FIG. 5. Pixel cases 1-7 are abbreviated in the table as follows:1-Pull (regular), 2-Pull (occlusion), 3-Push (regular), 4-Push(occlusion), 5-Refine-Z, 6-Magnetic Pull, and 7-Occlusion (no action). A“Yes” entry in the “Receives Forces?” column indicates that the joint ofthat row may receive forces from a force vector. An “X” entry in a pixelcases column denotes that the joint of that row may receive a force froma force vector corresponding to the pixel case of that column. It is tobe understood that the following table is provided as an example. It isnot to be considered limiting. Other relationships between models andpixel cases may be established without departing from the scope of thisdisclosure.

Receives Pixel Cases Joint Forces? 1 2 3 4 5 6 7 j1 Yes X X X X X X j2Yes X X X X X X j3 Yes X X X X X X j4 Yes X X X X X X j5 Yes X X X X X Xj6 Yes X X X X X X j7 Yes X X X X X X j8 Yes X X X X X X j9 Yes X X X XX X j10 Yes X X X X X X j11 Yes X X X X X X j12 Yes X X X X X X j13 YesX X X X X X j14 Yes X X X X X X j15 Yes X X X X X X j16 Yes X X X X X Xj17 Yes X X j18 Yes X X j19 Yes X X j20 Yes X X j21 Yes X X j22 Yes X Xj23 Yes X X X X X X j24 Yes X X X X X X j25 Yes X X X X X X j26 Yes X XX X X X j27 Yes X X X X X X j28 Yes X X X X X X j29 No — — — — — — — j30No — — — — — — — j31 No — — — — — — — j32 Yes X X X X X X j33 Yes X X XX X X j34 No — — — — — — — j35 No — — — — — — — j36 No — — — — — — — j37No — — — — — — — j38 No — — — — — — — j39 No — — — — — — — j40 No — — —— — — — j41 No — — — — — — — j42 No — — — — — — — j43 No — — — — — — —j44 No — — — — — — — j45 No — — — — — — — j46 No — — — — — — — j47 No —— — — — — —

At 140, method 100 of FIG. 7 includes, for each synthesized pixel forwhich a pixel case has been determined, computing a force vector basedon the pixel case selected for that synthesized pixel. As describedabove, each pixel case corresponds to a different algorithm and/ormethodology for selecting the magnitude, direction, and/orforce-receiving location of a force vector. The force vectors may becomputed and/or accumulated in any coordinate space, such as worldspace, screen space (pre-Z-divide), projection space (post-Z-divide),model space, and the like.

At 142, method 100 includes mapping each computed force vector to one ormore force-receiving locations of the model. Mapping may include mappinga computed force vector to a “best-matching” force-receiving location.The selection of a best-matching force-receiving location of the modelis dependent on the pixel case selected for the corresponding pixel. Thebest-matching force-receiving location may be the nearest joint, vertex,or centroid, for example. In some embodiments, moments (i.e., rotationalforces) may be applied to a model.

In general, translations may result from forces with similar directionsacting on the force-receiving locations of a model, and rotations mayresult from forces of different directions acting on the force-receivinglocations of a model. For deformable objects, some of the components ofthe force vectors may be used to deform the model within its deformationlimits, and the remaining components of the force vectors may be used totranslate and/or rotate the model.

In some embodiments, force vectors may be mapped to the best-matchingrigid or deformable object, sub-object, and/or set of polygons of anobject. Accordingly, some of the force vectors may be used to deform themodel, and the remaining components of the force vectors may be used toperform rigid translation of the model. Such a technique may result in a“broken” model (e.g., an arm could be severed from the body). Asdiscussed in more detail below, a rectification step may then be used totransform translations into rotations and/or apply constraints in orderto connect body parts back together along a low-energy path.

FIGS. 11A and 11B shows a very simplified example of applying forcevectors to a model—in the illustrated example, a skeletal model 180. Forthe sake of simplicity, only two force vectors are shown in theillustrated example. Each such force vector may be the result of thesummation of two or more different force vectors resulting from thepixel case determinations and force vector calculations of two or moredifferent pixels. Often times, a model will be adjusted by manydifferent force vectors, each of which is the sum of many differentforce vectors resulting from the pixel case determinations and forcevector calculations of many different pixels.

FIG. 11A shows a skeletal model 180, where force vector 182 is to beapplied to joint j18 (i.e., an elbow) and force vector 184 is to beapplied to joint j20 (i.e., a wrist), for the purpose of straighteningone arm of skeletal model 180 to more closely match an observed depthimage. FIG. 11B shows skeletal model 180 after the forces are applied.FIG. 11B illustrates how the applied forces adjust the pose of themodel. As shown in FIG. 11B, the lengths of the skeletal members may bepreserved. As further shown, the position of joint j2 remains at theshoulder of the skeletal model, as expected for the case of a humanstraightening their arm. In other words, the skeletal model remainsintact after the forces have been applied. Maintaining the integrity ofthe skeletal model when applying forces results from one or moreconstraints being applied, as discussed in more detail hereafter. Avariety of different constraints can be enforced to maintain theintegrity of different possible model types.

At 144, method 100 of FIG. 7 optionally includes rectifying the model toa pose satisfying one or more constraints. As described above, aftercollecting and mapping the computed force vectors to the force-receivinglocations of the model, the computed force vectors may then be appliedto the model. If performed without constraint, this may “break” themodel, stretching it out of proportion and/or moving body parts intoinvalid configurations for the actual body of the target. Iterations ofvarious functions may then be used to “relax” the new model positioninto a “nearby” legal configuration. During each iteration of rectifyingthe model, constraints may be gently and/or gradually applied to thepose, in order to limit the set of poses to those that are physicallyexpressible by one or more actual bodies of one or more targets. Inother embodiments, such a rectifying step may be done in a non-iterativemanner.

In some embodiments, the constraints may include one or more of:skeletal member length constraints, joint angle constraints, polygonedge angle constraints, and collision tests, as described hereafter.

As an example in which a skeletal model is used, skeletal member (i.e.,bone) length constraints can be applied. Force vectors that can bedetected (i.e., force vectors at locations where joints and/or bodyparts are visible and not occluded) may be propagated along a network ofskeletal members of the skeletal model. By applying skeletal memberlength constraints, the propagated forces may “settle in” once all ofthe skeletal members are of acceptable lengths. In some embodiments, oneor more of the skeletal member lengths are allowed to be variable withina predetermined range. For example, the length of skeletal membersmaking up the sides of the torso may be variable to simulate adeformable midsection. As another example, the length of skeletalmembers making up the upper-arm may be variable to simulate a complexshoulder socket.

A skeletal model may additionally or alternatively be constrained bycomputing a length of each skeletal member based on the target, suchthat these lengths may be used as constraints during rectification. Forexample, the desired bone lengths are known from the body model; and thedifference between the current bone lengths (i.e., distances between newjoint positions) and the desired bone lengths can be assessed. The modelcan be adjusted to decrease any error between desired lengths andcurrent lengths. Priority may be given to certain joints and/or bonesthat are deemed more important, as well as joints or body parts that arecurrently more visible than others. Also, high-magnitude changes may begiven priority over low-magnitude changes.

Joint visibility and/or confidence may be separately tracked in the X,Y, and Z dimensions to allow more accurate application of bone lengthconstraints. For example, if a bone connects the chest to the leftshoulder, and the chest joint's Z position is high-confidence (i.e.,many refine-z pixels correspond to the joint) and the shoulder'sY-position is high-confidence (many push/pull pixels correspond to thejoint), then any error in the bone length may be corrected whilepartially or fully limiting movement of the shoulder in the Y directionor the chest in the Z direction.

In some embodiments, joint positions prior to rectification may becompared to joint positions after rectification. If it is determinedthat a consistent set of adjustments is being made to the skeletal modelin every frame, method 100 may use this information to perform a“progressive refinement” on the skeletal and/or body model. For example,by comparing joint positions before and after rectification it may bedetermined that in each frame the shoulders are being pushed wider apartduring rectification. Such a consistent adjustment suggests that theshoulders of the skeletal model are smaller than that of the targetbeing represented, and consequently, the shoulder width is beingadjusted each frame during rectification to correct for this. In such acase, a progressive refinement, such as increasing the shoulder width ofthe skeletal model, may be made to correct the skeletal and/or bodymodel to better match the target.

In regards to joint angle constraints, certain limbs and body parts maybe limited in their range of motion relative to an adjacent body part.Additionally, this range of motion may change based on the orientationof adjacent body parts. Thus, applying joint angle constraints may allowlimb segments to be constrained to possible configurations, given theorientation of parent limbs and/or body parts. For example, the lowerleg can be configured to bend backwards (at the knee), but not forwards.If illegal angles are detected, the offending body part(s) and/or theirparents (or, in the case of a mesh model, the offending triangles andtheir neighbors) are adjusted to keep the pose within a range ofpredetermined possibilities, thus helping avoid the case where the modelcollapses into a pose that is deemed to be unacceptable. In certaincases of extreme angle violations, the pose may be recognized asbackwards, i.e., what is being tracked as the chest is really theplayer's back; the left hand is really the right hand; and so on. Whensuch an impossible angle is clearly visible (and sufficientlyegregious), this can be interpreted to mean that the pose has beenmapped backwards onto the player's body, and the pose can be flipped toaccurately model the target.

Collision tests may be applied to prevent the model frominterpenetrating itself. For example, collision tests may prevent anypart of the forearms/hands from penetrating the torso, or prevent theforearms/hands from penetrating each other. In other examples, collisiontests may prevent a leg from penetrating the other leg. In someembodiments, collision tests may be applied to models of two or moreplayers to prevent similar scenarios from occurring between models. Insome embodiments, collision tests may be applied to a body model and/ora skeletal model. In some embodiments, collision tests may be applied tocertain polygons of a mesh model.

Collision tests may be applied in any suitable manner. One approachexamines collisions of one “volumetric line segment” vs. another, wherea volumetric line segment may be a line segment with a radius thatextends out in 3-D. An example of such a collision test may be examininga forearm vs. another forearm. In some embodiments, the volumetric linesegment may have a different radius at each end of the segment.

Another approach examines collisions of a volumetric line segment vs. aposed polygonal object. An example of such a collision test may beexamining a forearm vs. a torso. In some embodiments, the posedpolygonal object may be a deformed polygonal object.

In some embodiments, knowledge that different portions of a target canmove a limited distance in a time frame (e.g., 1/30th or 1/60th of asecond) can be used as a constraint. Such a constraint may be used torule out certain poses resulting from application of forces topixel-receiving locations of the model.

As indicated at 145, after the model has been adjusted and optionallyconstrained, the process can loop back to begin a new rasterization ofthe model into a new synthesized depth image, which may then be comparedto the observed depth image so that further adjustments can be made tothe model. In this way, the model can be progressively adjusted to moreclosely represent the modeled target. Virtually any number of iterationscan be completed each frame. More iterations may achieve more accurateresults, but more iterations also may demand more computing overhead. Itis believed that two or three iterations per frame is appropriate inmany scenarios, although one iteration may be sufficient in someembodiments.

At 146, method 100 of FIG. 7 optionally includes changing the visualappearance of an on-screen character (e.g., player avatar 190 of FIG.12A) responsive to changes to the model, such as changes shown in FIG.11B. For example, a user playing an electronic game on a gaming console(e.g., gaming system 12 of FIGS. 1A and 1B) may be tracked by the gamingconsole as described herein. In particular, a body model (e.g., bodymodel 70 of FIG. 3) including a skeletal model (e.g., skeletal model 180of FIG. 11A) may be used to model the target game player, and the bodymodel may be used to render an on-screen player avatar. As the gameplayer straightens one arm, the gaming console may track this motion,then in response to the tracked motion, adjust the model 180 as depictedin FIG 11B. The gaming console may also apply one or more constraints,as described above. Upon making such adjustments and applying suchconstraints, the gaming console may display the adjusted player avatar192, as shown in FIG. 12B. This is also shown by way of example in FIG.1A, in which player avatar 24 is shown punching boxing opponent 22responsive to game player 18 throwing a punch in real space.

As discussed above, visual target recognition can be performed forpurposes other than changing the visual appearance of an on-screencharacter or avatar. As such, the visual appearance of an on-screencharacter or avatar need not be changed in all embodiments. As discussedabove, target tracking can be used for virtually limitless differentpurposes, many of which do not result in the changing of an on-screencharacter. The target tracking and/or the pose of the model, asadjusted, can be used as a parameter to affect virtually any element ofan application, such as a game.

As indicated at 147, the above described process can be repeated forsubsequent frames.

It should be understood that the configurations and/or approachesdescribed herein are exemplary in nature, and that these specificembodiments or examples are not to be considered in a limiting sense,because numerous variations are possible. The specific routines ormethods described herein may represent one or more of any number ofprocessing strategies. As such, various acts illustrated may beperformed in the sequence illustrated, in other sequences, in parallel,or in some cases omitted. Likewise, the order of the above-describedprocesses may be changed.

The subject matter of the present disclosure includes all novel andnonobvious combinations and subcombinations of the various processes,systems and configurations, and other features, functions, acts, and/orproperties disclosed herein, as well as any and all equivalents thereof.

1. A method of electronic gaming, the method comprising; representing ahuman game player with a machine-readable model configured foradjustment into a plurality of different poses; receiving an observeddepth image of the human game player from a source; rasterizing themachine-readable model of the human game player into a synthesized depthimage; adjusting a pose of the machine-readable model based, at least inpart, on differences between the observed depth image and thesynthesized depth image; and using the pose of the machine-readablemodel, as adjusted, as a parameter to affect an element of game play. 2.The method of claim 1, where the observed depth image includes aplurality of observed pixels, one or more observed pixels including anobserved depth value indicating a distance between the source and aportion of the human game player corresponding to that observed pixel.3. The method of claim 1, where the synthesized depth image includes aplurality of synthesized pixels, one or more synthesized pixelsincluding a synthesized depth value indicating a distance between thesource and a portion of the human game player represented by thatsynthesized pixel.
 4. The method of claim 1, where the synthesized depthimage includes a plurality of synthesized pixels, one or moresynthesized pixels including a body-part index indicating a portion ofthe human game player to which that synthesized pixel corresponds. 5.The method of claim 1, where adjusting the pose of the machine-readablemodel is based on a difference between an observed depth value of anobserved pixel and a synthesized depth value of a correspondingsynthesized pixel.
 6. A method of tracking a target, the methodcomprising: receiving an observed depth image of the target from asource; obtaining a model of the target, the model having a pose;rasterizing the model into a synthesized depth image; adjusting the poseof the model based, at least in part, on differences between theobserved depth image and the synthesized depth image.
 7. The method ofclaim 6, where the observed depth image includes a plurality of observedpixels, one or more observed pixels including an observed depth valueindicating a distance between the source and a portion of the targetcorresponding to that observed pixel.
 8. The method of claim 6, wherethe source includes a depth camera.
 9. The method of claim 6, where thesource includes stereo cameras.
 10. The method of claim 6, where themodel includes a plurality of body parts adjustably connected by aplurality of joints.
 11. The method of claim 6, where the model includesa plurality of skeletal members adjustably connected by a plurality ofjoints.
 12. The method of claim 6, where the model includes a wireframemesh including a plurality of polygons adjustably connected at polygonaledges.
 13. The method of claim 6, where the synthesized depth imageincludes a plurality of synthesized pixels, one or more synthesizedpixels including a synthesized depth value indicating a distance betweenthe source and a portion of the target represented by that synthesizedpixel.
 14. The method of claim 6, where the synthesized depth imageincludes a plurality of synthesized pixels, one or more synthesizedpixels including a body-part index indicating a portion of the target towhich that synthesized pixel corresponds.
 15. The method of claim 6,where the synthesized depth image includes a plurality of synthesizedpixels, each synthesized pixel including a target index indicating atarget to which that synthesized pixel corresponds.
 16. The method ofclaim 6, where adjusting the pose of the model is based on a differencebetween an observed depth value of an observed pixel and a synthesizeddepth value of a corresponding synthesized pixel.
 17. The method ofclaim 6, where adjusting the pose of the model is further based on abody-part index of an observed pixel that differs from a correspondingsynthesized pixel.
 18. The method of claim 6, where adjusting the poseof the model includes applying one or more forces to force-receivinglocations of the model and allowing the model to move responsive to suchforces.
 19. The method of claim 6, where adjusting the pose of the modelincludes rectifying the model in accordance with one or moreconstraints.
 20. A computing system, comprising: a source configured tocapture depth information; a logic subsystem operatively connected tothe source; and a data-holding subsystem holding instructions executableby the logic subsystem to: receive an observed depth image of a targetfrom the source; obtain a model of the target, the model having a pose;rasterize the model into a synthesized depth image; adjust the pose ofthe model based, at least in part, on differences between the observeddepth image and the synthesized depth image.